﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace XNACompilator
{
    /// <summary>
    /// Exception throw when an compilation failed
    /// </summary>
    public class CompileException : Exception
    {
        public List<Asset> ErrorAssetFrom { get; internal set; }

        #region CTOR

        /// <summary>
        /// CTOR
        /// </summary>
        /// <param name="message">Message or the error</param>
        /// <param name="_as">Assets that failed</param>
        public CompileException(string message, params Asset[] _as) : base(message)
        {
            ErrorAssetFrom = new List<Asset>(_as);
        }

        /// <summary>
        /// CTOR
        /// </summary>
        /// <param name="message">Message or the error</param>
        /// <param name="_as">Assets that failed</param>
        public CompileException(string message, IEnumerable<Asset> _as)
            : base(message)
        {
            ErrorAssetFrom = new List<Asset>(_as);
        }

        #endregion
    }
}
